package 设计模式.prototype.demo01;

import java.util.Date;

/*
实现一个接口implements Cloneable
重写一个方法.clone()
 */

//视频原型 video类
public class Video implements Cloneable{
    private String name;
    private Date createTime;
    @Override
    protected Object clone() throws CloneNotSupportedException{
        return super.clone();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Video(String name, Date createTime) {
        this.name = name;
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "video{" +
                "name='" + name + '\'' +
                ", createTime=" + createTime +
                '}';

    }

}
